<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    //对象解构赋值允许我们使用变量的名字匹配对象的属性 匹配成功将对象的属性值赋给变量。
    const {
        address,
        userInfo
    } = {
        userInfo: {
            name: 'zhangsan',
            age: 18
        },
        address: {
            sheng: '河南',
            shi: '商丘'
        }

    }
    console.log(address.sheng);

    let [b, ,a] = [1, 2, 3]
    console.log(a);
</script>

</html>